package org.geektimes.web.mvc.work.week02;



/**
 * {@link }
 *
 * @description: 存储组件上下文
 * @author: magic_json
 * @create: 2021-03-10 21:26
 * @since 1.0
 **/
public interface IComponentContext {

    <C> C getComponent(String name);

    /**
     * @description  存储容器上下文r
     */
    final class ComponentContextStorage {

        private static IComponentContext iComponentContext;

        public static IComponentContext getComponentContext() {
            return iComponentContext;
        }

        public static void setComponentContext(IComponentContext ComponentContext) {
            iComponentContext = ComponentContext;
        }
    }
}

